<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
.errorMessage {
	color: red;
}
</style>

<title>Insert title here</title>
</head>
<body>
	

	<div
		style="width: 50%; height: 400px; background-color: silver; float: left;">
		<form action="j_spring_security_check" method="post">
			<table>
				<tr>
					<td>User Name</td>
					<td><input name="j_username" type="text"></td>
				</tr>
				<tr>
					<td>Password</td>
					<td><input name="j_password" type="password"></td>
				</tr>
				<tr>
					<td></td>
					<td><input type="submit" value="Login"></td>
				</tr>
			</table>
		</form>

		<c:if test="${not empty param.login_error}">
			<p class="errorMessage" style="text-align: left;">
				Your login attempt was not successful, try again.<br /> Reason:
				<c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}" />
				.
			</p>
		</c:if>


	</div>
	<div
		style="width: 50%; height: 400px; background-color: thistle; float: left;">
		<form:form action="registerUser.htm" modelAttribute="registerUser"
			commandName="registerUser">
			<table>
				<tr>
					<td>User Name</td>
					<td><form:input path="userId" /></td>
					<td><form:errors path="userId"  cssClass="errorMessage"/></td>
					
				</tr>
				<tr>
					<td>Email Id</td>
					<td><form:input path="emailId" /></td>
					<td><form:errors path="emailId" cssClass="errorMessage" /></td>
				</tr>
				<tr>
					<td>Password</td>
					<td><form:input path="password" /></td>
					<td><form:errors path="password" cssClass="errorMessage"/></td>
				</tr>
				<tr>
					<td></td>
					<td><input type="submit" value="Register"></td>
				</tr>
			</table>
		</form:form>
	</div>

	
</body>
</html>